﻿using ST.Torch.WebApi.Core.Entities.System;
using System.Linq.Expressions;


namespace ST.Torch.WebApi.Application;

public interface  ISYSUserService
{
	#region curd
	void Insert(SYSUser entity);


	Task InsertAsync(SYSUser entity, string[] Includes = null);

	void Update(SYSUser entity, string[] Includes = null);

	Task UpdateAsync(SYSUser entity, string[] Includes = null);

	void Delete(SYSUser entity, bool IsSoft = false);

	Task DeleteAsync(SYSUser entity, bool IsSoft = false);

    bool Any(Expression<Func<SYSUser, bool>> predicate);
    Task<bool> AnyAsync(Expression<Func<SYSUser, bool>> predicate);

    SYSUser Single(Expression<Func<SYSUser, bool>> predicate, bool tracking = false);


    Task<SYSUser> SingleAsync(Expression<Func<SYSUser, bool>> predicate, bool IsIncludeRole = false, bool tracking = false);

	List<SYSUser> Query(Expression<Func<SYSUser, bool>> predicate, bool tracking = false);

	Task<List<SYSUser>> QueryAsync(Expression<Func<SYSUser, bool>> predicate, bool tracking = false);


	PagedList<SYSUser> QueryPage(Expression<Func<SYSUser, bool>> predicate, PageReq page, bool tracking = false);

	Task<PagedList<SYSUser>> QueryPageAsync(Expression<Func<SYSUser, bool>> predicate, PageReq page, bool tracking = false);
	




	#endregion
}
